<%--
  Created by IntelliJ IDEA.
  User: 烽
  Date: 2015/7/11
  Time: 19:47
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title></title>
    <style>
        h1{color: chocolate}
        .font{
            color: #2dbc2d}
    </style>
    <script type="text/javascript" src="/js/jquery-1.7.2.js"></script>
    <script type="text/javascript">
        $(function () {
            $("a[pageNo]").click(function () {
                var page = $(this).attr("pageNo");
                $("input[name=pageNo]").val(page);
                $("#seach").submit();
            })
        })
    </script>
</head>
<body>
<h1>findUser</h1>
<form action="list" method="post" id="seach">
    <input type="hidden" name="pageNo" value="1">
</form>
<table>
    <c:forEach items="${obj.list}" var="u">
        <tr>
            <td class="font">${u.id}</td>
            <td class="font">${u.name}</td>
            <td class="font">${u.age}</td>
            <td class="font">${u.date}</td>
        </tr>
    </c:forEach>
</table>

<div >
    共有 &nbsp;${obj.pageInfo.pages} &nbsp;页  &nbsp; 当前是第 &nbsp;${obj.pageInfo.pageNum} &nbsp;页 &nbsp;
    <c:if test="${obj.pageInfo.hasNextPage==true}">
        <a href="javaScript:;" pageNo="${obj.pageInfo.nextPage}">下一页</a>
        <a href="javascript:;" pageNo="${obj.pageInfo.lastPage}">末页</a> &nbsp;
    </c:if>
    <c:if test="${obj.pageInfo.hasPreviousPage==true}">
        <a href="javaScript:;" pageNo="${obj.pageInfo.prePage}">上一页</a>
        <a href="javascript:;" pageNo="${obj.pageInfo.firstPage}">首页</a> &nbsp;
    </c:if>
</div>
</body>
</html>